<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>操作样式</title>
</head>
<body>
<div>
	<p class="fish">草鱼</p>
	<p class="fish">草鱼</p>
	<p class="fish">草鱼</p>
	<span id="app" class="fields">看来季后赛得分手段</span>	

</div>
<script type="text/javascript">
// 方法1 dom 节点对象 .style.css 样式名，如果css 样式是合成词，例如：font-size background-color
// 设置css样式时，需要采用小驼峰的规则
var op = document.getElementsByTagName('p');

op[0].style.fontSize = '30px';
op[1].style.backgroundColor = 'red';
op[2].className = 'pq';
console.log(op);

</script>
</body>
</html>